import SvgIcon from "./SvgIcon/index.vue";
import Category from "./Category/index.vue";
//引入element-plus的图标组件
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
//对外暴露插件对象
const allGolbalComponents: any = { SvgIcon, Category };
export default {
  install(app: any) {
    Object.keys(allGolbalComponents).forEach((key) => {
      const component = allGolbalComponents[key];
      app.component(key, component);
    });
    //注册所有的element-plus图标组件
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component);
    }
  },
};
